<template>
  <div>

    <div style="margin-top: 15px;">
      <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
        <el-select v-model="select" slot="prepend" placeholder="请选择">
          <el-option label="基金名" value="1"></el-option>
          <el-option label="基金代码" value="2"></el-option>
          <el-option label="基金经理" value="3"></el-option>
        </el-select>
        <el-button slot="append" icon="el-icon-search" @click="doSearch"></el-button>
      </el-input>
    </div>
  </div>

</template>


<style>
.el-select .el-input {
  width: 130px;
}
.input-with-select .el-input-group__prepend {
  background-color: #fff;
}
</style>
<script>
import {mapActions} from "vuex";

export default {

  data() {
    return {
      input1: '',
      input2: '',
      input3: '',
      select: ''
    }
  },
  methods: {
    ...mapActions(['doSearch']),
    doSearch() {
      localStorage.setItem('search_code', this.input3)
      this.$router.push({path: '/search', query: {input: this.input3, select: this.select}})
    }
  }
}



</script>